/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ChatPanel.java
 *
 * Created on Apr 28, 2011, 1:58:55 PM
 */

package GUIFORMS;

/**
 *
 * @author danielsl
 */
public class ChatPanel extends javax.swing.JPanel {

    /** Creates new form ChatPanel */
    public ChatPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainChatPane = new javax.swing.JScrollPane();
        textAreaMainChat = new javax.swing.JTextArea();
        userScrollPane = new javax.swing.JScrollPane();
        userList = new javax.swing.JList();
        onlineUsersLabel = new javax.swing.JLabel();
        chatRoomForProjectLabel = new javax.swing.JLabel();
        inputTextScrollPane = new javax.swing.JScrollPane();
        inputText = new javax.swing.JTextArea();
        sendButton = new javax.swing.JButton();

        textAreaMainChat.setColumns(20);
        textAreaMainChat.setEditable(false);
        textAreaMainChat.setLineWrap(true);
        textAreaMainChat.setRows(5);
        mainChatPane.setViewportView(textAreaMainChat);

        userScrollPane.setViewportView(userList);

        onlineUsersLabel.setText("Påloggede brukere:");

        chatRoomForProjectLabel.setText("Chatterom for prosjekt:  ");

        inputText.setColumns(20);
        inputText.setLineWrap(true);
        inputText.setRows(3);
        inputTextScrollPane.setViewportView(inputText);

        sendButton.setText("Send");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(inputTextScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 552, Short.MAX_VALUE)
                    .add(mainChatPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 552, Short.MAX_VALUE)
                    .add(chatRoomForProjectLabel))
                .add(34, 34, 34)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(sendButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(userScrollPane, 0, 0, Short.MAX_VALUE)
                    .add(onlineUsersLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(chatRoomForProjectLabel)
                    .add(onlineUsersLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(mainChatPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, userScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(inputTextScrollPane)
                    .add(sendButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel chatRoomForProjectLabel;
    private javax.swing.JTextArea inputText;
    private javax.swing.JScrollPane inputTextScrollPane;
    private javax.swing.JScrollPane mainChatPane;
    private javax.swing.JLabel onlineUsersLabel;
    private javax.swing.JButton sendButton;
    private javax.swing.JTextArea textAreaMainChat;
    private javax.swing.JList userList;
    private javax.swing.JScrollPane userScrollPane;
    // End of variables declaration//GEN-END:variables

}
